/*
 *
 * inner product calculation
 *
 */

#include <sys/types.h>

typedef long long data_t;

data_t
iprod(const data_t *va, size_t step_a, const data_t *end_va,
      const data_t *vb, size_t step_b)
{
  data_t s = 0;
  while(va != end_va){
    s += *va * *vb;
    va += step_a;
    vb += step_b;
  }
  return s;
}
